package com.mini.controller;

import com.mini.config.CheckLogin;
import com.mini.model.BusinessXcxDic;
import com.mini.service.BusinessXcxDicService;
import com.mini.vo.BusinessResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author xyf
 *
 */
@RestController
@RequestMapping("/business/xcx")
@Api(tags = "小课业务相关接口")
@Slf4j
public class BusinessXcxDicControler extends BaseController {

    @Autowired
    private BusinessXcxDicService businessXcxDicService;



    @CheckLogin
    @ApiOperation(value = "查询小程序列表", notes = "查询小程序列表")
    @GetMapping("/getXcxList")
    public BusinessResult<BusinessXcxDic> getProvinceList(@ApiParam(value = "token", required = true) @RequestHeader String Authorization){

        List<BusinessXcxDic> relist = businessXcxDicService.getAll();
        return BusinessResult.createSuccessInstance(relist);

    }






}

